Introduction to GitHub and GitHub Desktop

Introduction to GitHub

GitHub is a version control system for keeping track of code. It allows for the sharing of code, collaboration and is a useful tool for ensuring reproducibility, tracking the history of your code and publishing. Git is technically the version control system that is used whilst GitHub is an online repository hosting service that makes it much more user friendly.

GitHub uses quite clunky language and can be a little hard to get into initially. Some key terms include: - Repositories: A repository (or repo) is a project containing files and their revision history. – this is generally where your code is stored - Branches: Branches allow you to work on different parts of a project separately. - Pull Requests: Pull requests are proposed changes to a repository, enabling collaborative review and discussion. - Push refers to sending your committed changes to a remote repository. - Issues: Issues are used to track tasks, enhancements, and bugs for your projects. - README: This is a file that you use to explain all the details of your repository.

Introduction to GitHub Desktop

GitHub Desktop is a free and open-source application that provides a graphical interface to manage your GitHub repositories. It simplifies the process of using Git and GitHub on your local machine, allowing you to perform tasks such as committing changes, creating branches, and resolving conflicts without using the command line.

1. Installing GitHub Desktop

Step-by-Step Installation Guide:

  • Download GitHub Desktop:
    • Visit the GitHub Desktop website
    • Click the “Download for Windows” (or “Download for macOS” if you’re using a Mac) button.
  • Install GitHub Desktop:
    • Once the download is complete, open the downloaded file.
    • Follow the installation prompts:
      • For Windows: Run the installer and follow the on-screen instructions.
      • For macOS: Drag the GitHub Desktop application to your Applications folder.
  • Launch GitHub Desktop:
    • After installation, open the GitHub Desktop application from your Start Menu (Windows) or Applications folder (macOS).


2. Setting Up GitHub Desktop

Sign In to GitHub:

  • When you first launch GitHub Desktop, you’ll be prompted to sign in to your GitHub account. Enter your GitHub username and password.
  • If you don’t have a GitHub account, you can create one at github.com.


3. Creating and Cloning Repositories

Creating a New Repository:

  • Open GitHub Desktop.
  • Select File > New Repository.
  • Fill in the repository details:
    • Name: The name of your repository.
    • Description: A brief description of your project.
    • Local Path: The location on your computer where the repository will be created.
    • Make sure to tick – initialize this repository with a README – this is good practice to allow you to explain the details of your repository
    • Git Ignore: Choose a template if you want to ignore certain files – this can be done later but we recommend adding these to stop your raw data files being uploaded.
    • License: Choose a license for your project – this depends on usage.
  • Click Create Repository.


Publishing a Repository:

  • Initially your repository is only on your pc.
  • To upload this to the master GitHub online record click Publish repository



  • You can then select whether to make the repository public or private (this can be changed later (anything public will be available to anyone so be careful!



Cloning an Existing Repository:

  • This is useful if you want to import a repository onto a new PC
  • Open GitHub Desktop.
  • Select File > Clone Repository.
  • Choose the repository you want to clone from the list or enter the URL of the repository.
  • Choose the local path where you want to clone the repository.
  • Click Clone.

Changes you make to your local repository will then be synced with the master copy that exists online. To ensure your local repository is up to date, you can use the “Fetch Origin” button (red box) to sync to the most up to date version of your repository.



4. Committing and Pushing Changes – this updates the online master record

Committing Changes:

  • Make Changes to Your Files:
    • Modify, add, or delete files in your repository
  • Open GitHub Desktop and View Changes:
    • GitHub Desktop will automatically detect changes.
    • You can see the changes listed in the “Changes” tab.


Stage Your Changes:

  • Select the files you want to include in your commit by checking the boxes next to them.



Write a Commit Message:

  • Enter a descriptive commit message in the “Summary” field.
  • Optionally, add more details in the “Description” field.



  • Click the Commit to main button (or the name of the branch you’re committing to).
    #### Pushing Changes:

  • Click the Push origin button to push your commit to the remote online repository on GitHub.



5. Pull Requests and Merging

This isn’t as important if you are the only one using your repository. However, if you are collaborating on a repository (e.g. a project in the phenotypic screening facility) then depending on your permissions your will need to propose your changes by making a pull request.


Creating a Pull Request:

  • Push Your Branch:
    • Ensure your branch is pushed to GitHub.


Open GitHub in Your Browser:

  • Go to your repository on GitHub.


Create a Pull Request:

  • Click the New pull request button.
  • Select the branch you want to merge into the base branch (usually main).
  • Click Create pull request.


Merging a Pull Request (Depends on permissions):

  • Review the Pull Request:
    • Check for any conflicts or issues.


Merge the Pull Request:

  • Click the Merge pull request button.
  • Confirm the merge.

6. Creating and Managing Branches


Creating a New Branch:

  • Open GitHub Desktop.
  • Click the Current Branch dropdown.
  • Select New Branch.
  • Enter the name of the new branch and click Create Branch.


Switching Branches:

  • Open GitHub Desktop.
  • Click the Current Branch dropdown.
  • Select the branch you want to switch to.

7. GitHub Online

  • You can also manage your GitHub repositories from the online interface
  • You can also make new repositories here and then clone to your machine



Using the Phenotypic Screening Facility GitHub

  • QMUL has access to GitHub Enterprise where all your code and data is kept walled within the university

  • All QM staff/students have access to their own version of this

  • However, this limits the ease with which scripts can be shared with external collaborators or made public

  • Therefore, the facility has a standard public GitHub

  • This may be found at https://github.com/Phenotypic-Screening-QMUL

  • We have put together a few public repositories which contain example scripts for both general bioinformatics as well analysis from the facility software.

  • These can be forked to copy them to your own GitHub entirely

  • If you spot an error, you can submit a pull request and we will review!



  • Alternatively individual scripts can be downloaded



  • Most of our example scripts come in the form of both raw scripts and html guides – which provide more detail and context.

  • These are generally found in the “walkthrough guides” folder and should be downloaded as above – they can then be opened in a web browser

  • Guides are also available on the facility Teams Hub in the “04 - Bioinformatics Script Repository”

  • For training, data analysis or further bioinformatics support, contact Ryan Wallis at: